import os

basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


class Config(object):
    SECRET_KEY = os.environ.get('SECRET_KEY') or '!@#$%^&*12345678'
    JWT_SECRET_KEY  = SECRET_KEY
    SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db')
    SQLALCHEMY_TRACK_MODIFICATIONS = False
    DEBUG_TB_INTERCEPT_REDIRECTS = False  # 这配置debug的工具栏不拦截302跳转


class DevelopmentConfig(Config):
    SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db')


class ProductionConfig(Config):
    SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db')
